package com.example.mallware.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.common.utils.PageUtils;
import com.example.mallware.controller.vo.MergeVO;
import com.example.mallware.controller.vo.PurchaseDoneVO;
import com.example.mallware.entity.PurchaseEntity;

import java.util.List;
import java.util.Map;

/**
 * 采购信息
 *
 * @author charlie
 * @email @gmail.com
 * @date 2023-11-25 13:00:18
 */
public interface PurchaseService extends IService<PurchaseEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 查询出状态为 新建 或者 已分配 的采购单
     *
     * @param params
     * @return
     */
    PageUtils queryUnreceiveList(Map<String, Object> params);

    /**
     * 完成采购需求的合单操作
     * @param mergeVO
     * @return
     */
    Integer merge(MergeVO mergeVO);

    /**
     * 领取采购单
     * @param ids
     * @return
     */
    Integer received(List<Long> ids);

    /**
     * 完成采购单
     * @param purchaseDoneVO
     * @return
     */
    Integer done(PurchaseDoneVO purchaseDoneVO);
}

